package cz.pproproj.aaservice.guimodule.model;

import java.util.Collections;
import java.util.List;

/**
 * @author David
 * @since 18. 1. 2015
 */
public class AuthorizationUser {

    private String _dataSource;

    private String _userName;

    public AuthorizationUser(String dataSource, String userName) {
        _dataSource = dataSource;
        _userName = userName;
    }

    public String getDataSource() {
        return _dataSource;
    }

    public void setDataSource(String dataSource) {
        _dataSource = dataSource;
    }

    public String getUserName() {
        return _userName;
    }

    public void setUserName(String userName) {
        _userName = userName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AuthorizationUser that = (AuthorizationUser) o;

        if (_dataSource != null ? !_dataSource.equals(that._dataSource) : that._dataSource != null) return false;
        return !(_userName != null ? !_userName.equals(that._userName) : that._userName != null);
    }

    @Override
    public int hashCode() {
        int result = _dataSource != null ? _dataSource.hashCode() : 0;
        result = 31 * result + (_userName != null ? _userName.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "AuthorizationUser{" +
                "_dataSource='" + _dataSource + '\'' +
                ", _userName='" + _userName + '\'' +
                '}';
    }
}
